<div id="imageCarousel" class="carousel slide" data-ride="carousel">
  <ol class="carousel-indicators">
    <% carousel.size.times do |i| %>
      <%= tag :li, data: { target: '#imageCarousel', "slide-to": i }, class: (i == 0 ? "active" : nil) %>
    <% end %>
  </ol>
  <div class="carousel-inner">
    <% carousel.each_with_index do |img, i|  %>
      <%= content_tag :div, class: (i == 0 ? "carousel-item active" : "carousel-item") do %>
        <%= image_tag img, class: "d-block w-100" %>
      <% end %>
    <% end %>
  </div>
  <a class="carousel-control-prev" href="#imageCarousel" role="button" data-slide="prev">
    <span class="carousel-control-prev-icon" aria-hidden="true"></span>
    <span class="sr-only">Previous</span>
  </a>
  <a class="carousel-control-next" href="#imageCarousel" role="button" data-slide="next">
    <span class="carousel-control-next-icon" aria-hidden="true"></span>
    <span class="sr-only">Next</span>
  </a>
</div>